package com.example.springbootdemo.scene.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;

/**
 *@author xuwangqi
 *@date 2021/5/24 15:58
 **/
@ApiModel(value="com-example-springbootdemo-scene-entity-User")
@Data
@TableName(value = "`user`")
public class User {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="")
    private Integer id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    @ApiModelProperty(value="用户名")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    @ApiModelProperty(value="密码")
    private String password;

    /**
     * 人物姓名
     */
    @TableField(value = "realname")
    @ApiModelProperty(value="人物姓名")
    private String realname;

    /**
     * 用户头像
     */
    @TableField(value = "avatar")
    @ApiModelProperty(value="用户头像")
    private String avatar;

    /**
     * 用户状态 -1 封禁 1 正常
     */
    @TableField(value = "status")
    @ApiModelProperty(value="用户状态 -1 封禁 1 正常")
    private Byte status;

    /**
     * 最后登录ip
     */
    @TableField(value = "ip")
    @ApiModelProperty(value="最后登录ip")
    private String ip;

    /**
     * 登录次数
     */
    @TableField(value = "count")
    @ApiModelProperty(value="登录次数")
    private Integer count;

    /**
     * 登录平台
     */
    @TableField(value = "platform")
    @ApiModelProperty(value="登录平台")
    private String platform;

    @TableField(value = "gmt_create")
    @ApiModelProperty(value="")
    private Date gmtCreate;

    @TableField(value = "gmt_modified")
    @ApiModelProperty(value="")
    private Date gmtModified;

    /**
     * 最后登录时间
     */
    @TableField(value = "gmt_login")
    @ApiModelProperty(value="最后登录时间")
    private Date gmtLogin;

    /**
     * 是否删除，1删除，0正常
     */
    @TableField(value = "is_deleted")
    @ApiModelProperty(value="是否删除，1删除，0正常")
    private Byte isDeleted;

    public static final String COL_ID = "id";

    public static final String COL_USERNAME = "username";

    public static final String COL_PASSWORD = "password";

    public static final String COL_REALNAME = "realname";

    public static final String COL_AVATAR = "avatar";

    public static final String COL_STATUS = "status";

    public static final String COL_IP = "ip";

    public static final String COL_COUNT = "count";

    public static final String COL_PLATFORM = "platform";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";

    public static final String COL_GMT_LOGIN = "gmt_login";

    public static final String COL_IS_DELETED = "is_deleted";
}